﻿package com.kt.common.exception;

import com.kt.common.result.ResultCode;
import lombok.Data;

/**
 * @author kt
 * @since 2024/3/10
 */
@Data
public class ApplicationException extends RuntimeException {

    private int code;

    public ApplicationException(int code, String message) {
        super(message);
        this.code = code;
    }

    public ApplicationException(ResultCode resultCode) {
        this(resultCode.getCode(), resultCode.getMessage());
    }
}
